{% extends "base.html" %}
{% load comments %}
{% block title %}Bookmark: {{ shared_bookmark.bookmark.title }}{% endblock %}
{% block head %}
	<a href="/vote/?id={{ shared_bookmark.id }}" class="vote">[+]</a>
	<a href="{{ shared_bookmark.bookmark.link.url }}" class="title">{{ shared_bookmark.bookmark.title }}</a>
{% endblock %}
{% block content %}
	Posted by:
	<a href="/user/{{ shared_bookmark.bookmark.user.username }}/" class="username">{{ shared_bookmark.bookmark.user.username }}</a> |	
	<span class="vote-count">Votes: {{ shared_bookmark.votes }}</span>
	<h2>Comments</h2>
	{% get_comment_count for bookmarks.sharedbookmark shared_bookmark.id as comment_count %}
	{% get_comment_list for bookmarks.sharedbookmark shared_bookmark.id as comment_list %}
	{% for comment in comment_list %}
		<div class="comment">
			<p><b>{{ comment.user.username }}</b> said:</p>
			{{ comment.comment|escape|urlizetrunc:40|linebreaks }}
		</div>
	{% endfor %}
	<p>Number of comments: {{ comment_count }}</p>
	{% render_comment_form for bookmarks.sharedbookmark shared_bookmark.id %}
{% endblock %}